package com.fire.control.system.dto.app;

import java.io.Serializable;
import java.util.Date;

import com.fire.control.system.entity.Device;
import com.fire.control.system.entity.WarningInfo;
import com.fire.control.system.entity.WarningProtocol;
import com.fire.control.system.support.util.StaticValue;

public class AppWarningInfoVo implements Serializable{

	private static final long serialVersionUID = 1L;
	// 设备id
	private String id;
	// 报警id
	private String warningId;
	// 设备编号
	private String serialNumber;
	
	private String mergerName;
	
	private Date startTime;
	
	private Date endTime;
	
	private String warningType;
	
	private String onlineStatus;
	
	private String currentStatus;
	
	private String warningDesc;
	
	private String groupName;
	
	private String planUrl;	
	
	private Integer floor;
	
	private Integer floorMax;
	
	private String planeX;
	
	private String planeY;
	
	private String longitude;
	
	private String latitude;
	
	
	
	public String getWarningId() {
		return warningId;
	}

	public void setWarningId(String warningId) {
		this.warningId = warningId;
	}

	public String getSerialNumber() {
		return serialNumber;
	}

	public void setSerialNumber(String serialNumber) {
		this.serialNumber = serialNumber;
	}

	public String getPlaneX() {
		return planeX;
	}

	public void setPlaneX(String planeX) {
		this.planeX = planeX;
	}

	public String getPlaneY() {
		return planeY;
	}

	public void setPlaneY(String planeY) {
		this.planeY = planeY;
	}

	public String getLongitude() {
		return longitude;
	}

	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}

	public String getLatitude() {
		return latitude;
	}

	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}

	public String getCurrentStatus() {
		return currentStatus;
	}

	public void setCurrentStatus(String currentStatus) {
		this.currentStatus = currentStatus;
	}

	public String getOnlineStatus() {
		return onlineStatus;
	}

	public void setOnlineStatus(String onlineStatus) {
		this.onlineStatus = onlineStatus;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	

	public String getWarningType() {
		return warningType;
	}

	public void setWarningType(String warningType) {
		this.warningType = warningType;
	}

	public String getWarningDesc() {
		return warningDesc;
	}

	public void setWarningDesc(String warningDesc) {
		this.warningDesc = warningDesc;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public String getPlanUrl() {
		return planUrl;
	}

	public void setPlanUrl(String planUrl) {
		if(planUrl != null) {
			this.planUrl = StaticValue.file_server_domain + planUrl;
		}
	}

	public Integer getFloor() {
		return floor;
	}

	public void setFloor(Integer floor) {
		this.floor = floor;
	}

	public Integer getFloorMax() {
		return floorMax;
	}

	public void setFloorMax(Integer floorMax) {
		this.floorMax = floorMax;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	
	public String getMergerName() {
		return mergerName;
	}

	public void setMergerName(String mergerName) {
		this.mergerName = mergerName;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	
	public void setVo(WarningInfo warningInfo, String planUrl) {
		this.id = warningInfo.getId();
		Device device = warningInfo.getTargetDevice();
		if(null != device) {
			this.floor = device.getFloor();
//			this.building = device.getBuilding();
			this.floorMax = device.getFloorMax();
			this.planUrl = planUrl;
			if(null != device.getDeviceGroup()) {
				this.groupName = device.getDeviceGroup().getGroupName();
			}
		}
		this.startTime = warningInfo.getStartTime();
		this.warningType = warningInfo.getWarningType();
		this.warningDesc = warningInfo.getWarningDesc();
	}

}
